package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.CustomTaglibraryEntity;
import com.ym.common.annotations.CustomConstraint;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.ym.medical.enums.TagCategoryEnum;
import com.ym.medical.enums.TagLevelEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 自定义标签库对象 custom_taglibrary
 *
 * @author ym
 * @date 2020-08-20
 */
@ApiModel("自定义标签库-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CustomTaglibraryUpdateParam extends BeanCovert<CustomTaglibraryEntity> {

	@ApiModelProperty("主键")
	@NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
	private Long id;

	@ApiModelProperty("标签名称")
	@Size(max = 50, message = "标签名称长度超过{max}", groups = {Add.class, Update.class})
	private String tglbName;

    @ApiModelProperty("标签分类(01-评价)")
    @Size(max = 2, message = "标签分类长度超过{max}", groups = {Add.class, Update.class})
    @CustomConstraint(TagCategoryEnum.class)
    private String tglbType;

    @ApiModelProperty("标签等级")
    @Size(max = 2, message = "标签等级长度超过{max}", groups = {Add.class, Update.class})
    @CustomConstraint(TagLevelEnum.class)
    private String tglbLevel;

}
